package ua.epam.java_bravo.data.dto.pk;

import java.io.Serializable;

/**
 * This class represents the primary key of the HS_WorkScale table.
 */
public class HsWorkscalePk implements Serializable {
    protected int workscaleId;

    /**
     * This attribute represents whether the primitive attribute workscaleId is null.
     */
    protected boolean workscaleIdNull;

    /**
     * Sets the value of workscaleId
     */
    public void setWorkscaleId(int workscaleId) {
        this.workscaleId = workscaleId;
    }

    /**
     * Gets the value of workscaleId
     */
    public int getWorkscaleId() {
        return workscaleId;
    }

    /**
     * Method 'HsWorkscalePk'
     */
    public HsWorkscalePk() {
    }

    /**
     * Method 'HsWorkscalePk'
     *
     * @param workscaleId
     */
    public HsWorkscalePk(final int workscaleId) {
        this.workscaleId = workscaleId;
    }

    /**
     * Sets the value of workscaleIdNull
     */
    public void setWorkscaleIdNull(boolean workscaleIdNull) {
        this.workscaleIdNull = workscaleIdNull;
    }

    /**
     * Gets the value of workscaleIdNull
     */
    public boolean isWorkscaleIdNull() {
        return workscaleIdNull;
    }

    /**
     * Method 'equals'
     *
     * @param _other
     * @return boolean
     */
    public boolean equals(Object _other) {
        if (_other == null) {
            return false;
        }

        if (_other == this) {
            return true;
        }

        if (!(_other instanceof HsWorkscalePk)) {
            return false;
        }

        final HsWorkscalePk _cast = (HsWorkscalePk) _other;
        if (workscaleId != _cast.workscaleId) {
            return false;
        }

        if (workscaleIdNull != _cast.workscaleIdNull) {
            return false;
        }

        return true;
    }

    /**
     * Method 'hashCode'
     *
     * @return int
     */
    public int hashCode() {
        int _hashCode = 0;
        _hashCode = 29 * _hashCode + workscaleId;
        _hashCode = 29 * _hashCode + (workscaleIdNull ? 1 : 0);
        return _hashCode;
    }

    /**
     * Method 'toString'
     *
     * @return String
     */
    public String toString() {
        StringBuffer ret = new StringBuffer();
        ret.append("ua.epam.java_bravo.data.dto.pk.HsWorkscalePk: ");
        ret.append("workscaleId=" + workscaleId);
        return ret.toString();
    }

}
